//************************************************************************
/// <copyrigth>2024-2025 Corporation.All Rights Reserved</copyrigth>
/// <author>tangyingzhong</author>
/// <contact>tangyz114987@outlook.com</contact>
/// <version>v1.0.0</version>
/// <describe>
/// It is an observer which can get target's changed data
///</describe>
/// <date>2024/5/6</date>
///***********************************************************************
#ifndef IOBSERVER_H
#define IOBSERVER_H

#include "ModuleLoader/ModuleConfig.h"

namespace SystemTool
{
    struct NotifyArgs
    {
        // Sender
        void* pSender = nullptr;

        // Args
        void* pArgs = nullptr;

        // Reserved
        void *pReserved = nullptr;
    };

    class CLASS_ITEM IObserver
    {
    public:
        // Destruct the obj
        virtual ~IObserver() {}

        // Receive notify(Note: multithread environment)
        virtual void Recv(NotifyArgs &Args) = 0;
    };
}

#endif // IOBSERVER_H
